﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Solution.Business.Entities;

namespace Solution.Data
{
    public class MailInfoDAC
    {
        SolutionEntities context = SolutionEntities.Context;
        public List<MailInfo> MailInfo_GetByTop(string Top, string Where, string Ord)
        {
            var list = context.MailInfo_GetByTop(Top, Where, Ord);
            return list.ToList();
        }

        public void MailInfo_Insert(MailInfo mailinfo)
        {
            context.MailInfo_Insert(mailinfo.Mail_Smtp, mailinfo.Mail_Port, mailinfo.Mail_Noreply, mailinfo.Mail_Password);
        }

        public void MailInfo_Update(MailInfo mailinfo)
        {
            context.MailInfo_Update(mailinfo.MailId, mailinfo.Mail_Smtp, mailinfo.Mail_Port, mailinfo.Mail_Noreply, mailinfo.Mail_Password);
        }
    }
}
